import mysql.connector
import sys
sys.path.append('../')
from db_controlter import DB_controlter

class WebSite(DB_controlter):
    def __init__(self):
        DB_controlter.__init__(self)
        self.items = list()

    def get_allowed_domains(self):
        self.cursor.execute("SELECT allowed_domain FROM WebPage_website")
        return [i[0] for i in self.cursor.fetchall()]
           
    def get_start_urls(self):
        self.cursor.execute("SELECT start_url FROM WebPage_website")
        return [i[0] for i in self.cursor.fetchall()]
